import request from "@/util/request";

//登录接口
export const userLoginService = (userData) => {
    return request.post('/user/login', userData);
}

//注册接口
export const userRegisterService = (userData) => {
    return request.post("/user/register", userData);
}

//获取用户信息
export const userInfoService = () => {
    return request.get("/user/userInfo")
}

//更新用户信息
export const eidtInfoService = (userData) => {
    return request.put("/user/editInfo", userData)
}

//更新密码
export const editPasswordService = (userData) => {
    return request.patch("/user/editPassword", userData)
}

//更新头像
export const editAvatarService = (avatar) => {
    return request.patch("/user/editAvatar", { avatar: avatar })
}